﻿Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Resources
Imports System.Windows.Forms
Imports System.Reflection
Public Class sisMensaje

    Dim strResourceFile As String = "DNP.GestionComercial.FormBase.Resources"

    Public Sub showMsgInformation(ByVal strMessage As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)
        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)

    End Sub



    Public Sub showMsgInformation(ByVal strMessage As String, ByVal strArg1 As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)
        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)

    End Sub


    Public Sub showMsgInformation(ByVal strMessage As String, ByVal strArg1 As String, ByVal strArg2 As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)
        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1, strArg2)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Information)

    End Sub
     

    Public Function showMsgQuestion(ByVal strMessage As String) As DialogResult
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)
        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)

        Return MessageBox.Show(strMessage, strTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question)

    End Function

    Public Function showMsgQuestion(ByVal strMessage As String, ByVal strTitle As String) As DialogResult
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)
        strTitle = rm.GetString(strTitle)
        strMessage = rm.GetString(strMessage)
        
        Return(MessageBox.Show(strMessage, strTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question))

    End Function

       
    Public Function showMsgQuestion(ByVal strMessage As String, ByVal strArg1 As String, ByVal strArg2 As String) As DialogResult
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1, strArg2)

        Return MessageBox.Show(strMessage, strTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question)

    End Function

    Public Sub showMsgWarning(ByVal strMessage As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)

    End Sub
   
    Public Sub showMsgWarning(ByVal strMessage As String, ByVal strArg1 As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)

    End Sub
 
    Public Sub showMsgWarning(ByVal strMessage As String, ByVal strArg1 As String, ByVal strArg2 As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1, strArg2)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)

    End Sub
    

    Public Sub showMsgWarningTitle(ByVal strMessage As String, ByVal strTitle As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)


        strMessage = rm.GetString(strMessage)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning)

    End Sub

   

    Public Sub showMsgExclamation(ByVal strMessage As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")

        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

    End Sub

   

    Public Sub showMsgExclamation(ByVal strMessage As String, ByVal strArg1 As String, ByVal strArg2 As String)
        Dim rm As ResourceManager = New ResourceManager(strResourceFile, System.Reflection.Assembly.GetExecutingAssembly)

        Dim strTitle As String = rm.GetString("msgTituloMensaje")
        strMessage = rm.GetString(strMessage)
        strMessage = String.Format(strMessage, strArg1, strArg2)
        MessageBox.Show(strMessage, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

    End Sub

   


End Class
